//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package mqtt5;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Component
public class ApplicationEngine implements ApplicationContextAware {
    public static ApplicationContext ctx;

    public ApplicationEngine() {
    }

    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        ctx = applicationContext;
    }

    public static <T> T getBean(String name) {
        try {
            T bean = ctx.getBean(name);
            return bean;
        } catch (Exception var2) {
            return null;
        }
    }

    public static <T> T getBean(Class<T> requiredType) {
        try {
            return ctx.getBean(requiredType);
        } catch (Exception var2) {
            return null;
        }
    }

    public static <T> T getBean(String name, Class<T> requiredType) {
        try {
            return ctx.getBean(name, requiredType);
        } catch (Exception var3) {
            return null;
        }
    }
}
